Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash on PHP 8.0 #2079

Merged
merged 2 commits into from
Sep 21, 2020
Merged

Fixed crash on PHP 8.0 #2079

merged 2 commits into from
Sep 21, 2020

Conversation

GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Aug 14, 2020

Fixes:

Error: Unknown named parameter $env

.../vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:124
.../vendor/aws/aws-sdk-php/src/ClientResolver.php:473
.../vendor/aws/aws-sdk-php/src/ClientResolver.php:295
.../vendor/aws/aws-sdk-php/src/AwsClient.php:199
.../vendor/aws/aws-sdk-php/src/S3/S3Client.php:328

Evidence this fix is correct: https://3v4l.org/LJchL, https://3v4l.org/IBO1U.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2020

Codecov Report

Merging #2079 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2079   +/-   ##
=========================================
  Coverage     93.24%   93.24%           
  Complexity     3854     3854           
=========================================
  Files           215      215           
  Lines         10411    10411           
=========================================
  Hits           9708     9708           
  Misses          703      703           
Impacted Files Coverage Δ Complexity Δ
src/Credentials/CredentialProvider.php 95.39% <100.00%> (ø) 150.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5651d8a...371775b. Read the comment docs.

@GrahamCampbell
Copy link
Contributor Author

Ping @SamRemis. This is a blocker for Laravel.

@SamRemis
Copy link
Member

SamRemis commented Aug 26, 2020

Thank you for the PR @GrahamCampbell, and I apologize for the delay in looking into it. I want to be positive that this will have no customer impact. It definitely looks safe to me, but this does strip some of the key data from $defaultChain. I don't see anywhere the keys are consumed so it should be safe to accept. I need to double check; barring any new findings, it will be completed soon

@GrahamCampbell
Copy link
Contributor Author

That's why I showed you https://3v4l.org/LJchL, https://3v4l.org/IBO1U, which proves this is safe.

Copy link
Member

@SamRemis SamRemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is good, please add a changelog file and we will merge it

@SamRemis
Copy link
Member

@GrahamCampbell I tried pushing it myself, but the repo denied permission. To add the changelog file, add the below contents to a file under .changes/nextrelease/[file-name-here].json. I used '.changes/nextrelease/php-8-patch.json'.

[
{
"type": "bugfix",
"category": "Credentials",
"description": "Fixes a crash in PHP 8.0 by calling array_values on the default chain array passed into self::chain"
}
]

@GrahamCampbell
Copy link
Contributor Author

GrahamCampbell commented Sep 2, 2020

You do (already) have permission to push to my branch, however the PR probably needs rebasing. Feel free to take it over, or just cherry-pick my commit.

@deguif deguif mentioned this pull request Sep 12, 2020
8 tasks
@deguif
Copy link
Contributor

deguif commented Sep 14, 2020

Any status about this fix?

@GrahamCampbell
Copy link
Contributor Author

Just rebased this and added the nextrelease entry.

@SamRemis SamRemis merged commit 3697479 into aws:master Sep 21, 2020
@GrahamCampbell GrahamCampbell deleted the patch-1 branch September 21, 2020 20:45
ruflin pushed a commit to ruflin/Elastica that referenced this pull request Oct 20, 2020
#### Done in this PR:

- [x] Update composer constraint to allow PHP 8.0.
- [x] Update travis configuration in order to run tests on PHP 8.0 (nightly).
- [x] Update changelog

#### Done in previous PRs:
- [x] Deprecate `Elastica\Query\Match` class and add a new `Elastica\Query\MatchQuery` class as match is now a reserved keyword. [#1799]
- [x] Update phpunit version in order to be compatible with PHP 8.0. [#1811]
- [x] Bump `aws/aws-sdk-php` package version to fix a bug with PHP 8.0. [#1798]

#### Done in external PRs:
- [x] Wait for `aws/aws-sdk-php` to be compatible with PHP 8. [aws/aws-sdk-php#2079]
- [ ] Wait for `elasticsearch/elasticsearch` to be compatible with PHP 8.0 and remove `--ignore-platform-reqs` composer option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants